package cn.itcast.lambda;

import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;

/**
 * @Author: taft
 * @Date: 2018-12-9 9:42
 */
public class HelloLambda {

    public static void main(String[] args) {
        // 准备一个集合
        List<Integer> list = Arrays.asList(10, 5, 25, -15, 20);

//       list.sort((v1,v2)->v2-v1);
//
//        System.out.println("list = " + list);

        for (Integer integer : list) {
            System.out.println("integer = " + integer);
        }

        list.forEach(ele-> System.out.println("ele = " + ele));
    }
}
